//
//  PlatformMsgCell.m
//  BaseProject
//
//  Created by 王洋 on 2020/7/17.
//  Copyright © 2020 王洋. All rights reserved.
//

#import "PlatformMsgCell.h"

@implementation PlatformMsgCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [self.isReadControl pp_clipCorners:UIRectCornerAllCorners radius:self.isReadControl.frame.size.height/2];
    });
    
}

- (void)fillCellWithModel:(CommonMessageModel *)model {
    
    self.timeLab.text = [NSString stringWithFormat:@" %@ ",model.createTime];
    
    self.titleLab.text = model.noticeTitle;
    self.contentLab.text = model.noticeContent;
    
    switch (model.isRead) {//是否已读1是2否
        case 1:{
            self.isReadControl.hidden = YES;
        } break;
        case 2:{
            self.isReadControl.hidden = NO;
        } break;
        default: {
            self.isReadControl.hidden = YES;
        } break;
    }
}

@end
